home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8157 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  36 lines

  1. Path: news.dfw.net!news
  2. From: k2p@dfw.net (Dave Burkett)
  3. Newsgroups: comp.lang.c++
  4. Subject: Visual C++/VB - 32-bit DLLs
  5. Date: 15 Feb 1996 07:38:00 GMT
  6. Organization: K2 Programming Corporation
  7. Message-ID: <4funso$57e@fnord.dfw.net>
  8. NNTP-Posting-Host: dallas11.dfw.net
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=ISO-8859-1
  11. X-Newsreader: WinVN 0.99.5
  12.  
  13. I'm trying to get a 32-bit DLL (created with Visual C++ 4.0) to hook up with 
  14. Visual Basic 4.0 (32-bit version). No problems with the VB 3.0 & Visual C++ 1.5 
  15. versions. Here is the DLL (my best guess).
  16.  
  17. #include <stdio.h>
  18. #include <windows.h>
  19.  
  20. extern "C" __declspec(dllexport) int __stdcall Foo ( int iNumber );
  21.  
  22. int APIENTRY DllMain( HANDLE hModule, DWORD ul_reason, LPVOID lpReserved )
  23. {
  24.     return TRUE;
  25. }
  26.  
  27. extern "C" __declspec(dllexport) int __stdcall Foo ( int iNumber )
  28. {
  29.     return ( iNumber + 10 );
  30. }
  31.  
  32. The trouble is, though the VB 4.0 app sees the DLL, I get a 'DLL function not 
  33. found' error. Any ideas about what might be going wrong here?
  34. Thanks for any assistance...
  35.  
  36.